package br.com.kliptus.model.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.maverick.bean.EntityBean;

@Entity
@Table(name = "address")
public class AddressJB extends EntityBean {

	private static final long serialVersionUID = 1L;
	
	private String street;
	private String district;
	private String cep;
	private String observation;
	private CityJB city;
	
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
	public Long getId() {
		return id;
	}

	@Column(name = "street")
	public String getStreet() {
		return street;
	}

	public void setStreet(String street) {
		this.street = street;
	}

	@Column(name = "district")
	public String getDistrict() {
		return district;
	}

	public void setDistrict(String district) {
		this.district = district;
	}	

	@Column(name = "cep")
	public String getCep() {
		return cep;
	}

	public void setCep(String cep) {
		this.cep = cep;
	}

	@Column(name = "observation")
	public String getObservation() {
		return observation;
	}

	public void setObservation(String observation) {
		this.observation = observation;
	}

	@ManyToOne
	@JoinColumn(name = "city_id", referencedColumnName = "id")
	public CityJB getCity() {
		return city;
	}

	public void setCity(CityJB city) {
		this.city = city;
	}
	
	

}
